package com.ctrl.riveradministrator.mvp.view.activity.trace.statistics;

import android.content.Context;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.ctrl.riveradministrator.R;
import com.ctrl.riveradministrator.base.BaseListAdapter;
import com.ctrl.riveradministrator.base.BaseViewHolder;
import com.ctrl.riveradministrator.mvp.model.Reach;
import com.ctrl.riveradministrator.mvp.model.ToDo;

public class StatisticsAdapter extends BaseListAdapter<Reach> {

    private Context context;
    private TextView name, t1, t2, t3, t4;

    public StatisticsAdapter(Context mContext) {
        super(mContext);
        this.context = mContext;
    }

    @Override
    public int getLayoutId() {
        return R.layout.statistic_item;
    }

    @Override
    public void onBindItemHolder(BaseViewHolder holder, int position) {
        name = holder.getView(R.id.tt);
        t1 = holder.getView(R.id.t1);
        t2 = holder.getView(R.id.t2);
        t3 = holder.getView(R.id.t3);
        t4 = holder.getView(R.id.t4);

        Reach reach = getDataList().get(position);
        name.setText(reach.getTotal_manager());
        t1.setText(reach.getTotal_patrol());
        t2.setText(reach.getPatrolled());
        t3.setText(reach.getNot_inspected());
        t4.setText(reach.getRate());
    }
}
